package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MaterialsMapper;
import com.ruoyi.system.domain.Materials;
import com.ruoyi.system.service.IMaterialsService;

/**
 * 物品表Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-26
 */
@Service
public class MaterialsServiceImpl implements IMaterialsService 
{
    @Autowired
    private MaterialsMapper materialsMapper;

    /**
     * 查询物品表
     * 
     * @param materialsId 物品表主键
     * @return 物品表
     */
    @Override
    public Materials selectMaterialsByMaterialsId(String materialsId)
    {
        return materialsMapper.selectMaterialsByMaterialsId(materialsId);
    }

    /**
     * 查询物品表列表
     * 
     * @param materials 物品表
     * @return 物品表
     */
    @Override
    public List<Materials> selectMaterialsList(Materials materials)
    {
        return materialsMapper.selectMaterialsList(materials);
    }

    /**
     * 新增物品表
     * 
     * @param materials 物品表
     * @return 结果
     */
    @Override
    public int insertMaterials(Materials materials)
    {
        return materialsMapper.insertMaterials(materials);
    }

    /**
     * 修改物品表
     * 
     * @param materials 物品表
     * @return 结果
     */
    @Override
    public int updateMaterials(Materials materials)
    {
        return materialsMapper.updateMaterials(materials);
    }

    /**
     * 批量删除物品表
     * 
     * @param materialsIds 需要删除的物品表主键
     * @return 结果
     */
    @Override
    public int deleteMaterialsByMaterialsIds(String[] materialsIds)
    {
        return materialsMapper.deleteMaterialsByMaterialsIds(materialsIds);
    }

    /**
     * 删除物品表信息
     * 
     * @param materialsId 物品表主键
     * @return 结果
     */
    @Override
    public int deleteMaterialsByMaterialsId(String materialsId)
    {
        return materialsMapper.deleteMaterialsByMaterialsId(materialsId);
    }
}
